package com.xy.lang.enums;

import java.util.Objects;

public interface StringCodeEnum <E extends Enum<E>> {

    /**
     *
     * @return
     */
    String getCode();

    /**
     *
     * @param target
     * @return
     */
    default boolean equalsTo(String target) {
        return Objects.equals(target, getCode());
    }

}
